using Firestarter.Test.Base;
using FireStarterModeller.BO;
using Habanero.Base;
using Habanero.Util;
using NUnit.Framework;

namespace FireStarterModeller.Test.BO
{
    [TestFixture]
    public class TestTransactionLogging
    {
        [TestFixtureSetUp]
        public void SetupTestFixture()
        {
            TestUtilsDomain.SetupFixture();
        }

        [SetUp]
        public void SetupTest()
        {
            TestUtilsDomain.SetupTest();
        }

        private static void AssertHasTransactionLogging(IBusinessObject businessObject)
        {
            object transactionLog = ReflectionUtilities.GetPrivatePropertyValue(businessObject, "TransactionLogEntry");
            Assert.IsNotNull(transactionLog, "BusinessObject should have an ITransactionLog object.");
            Assert.IsInstanceOf(typeof (ITransactionLog), transactionLog);
        }

        [Test]
        [Ignore("To be implemented")] //TODO Sherwin 06 Apr 2009: Ignored Test - To be implemented
        public void Test_DMSolution_ShouldHaveTransactionLogging()
        {
            //---------------Set up test pack-------------------

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            DMSolution dmSolution = new DMSolution();
            //---------------Test Result -----------------------
            AssertHasTransactionLogging(dmSolution);
        }
    }
}